#ifndef WORKTOOL_H
#define WORKTOOL_H

#include <QObject>
#include <QProcess>
#include <QVariant>

class WorkTool : public QObject
{
    Q_OBJECT
public:
    explicit WorkTool(QObject *parent = 0);
    
signals:
    void showProc(QVariant);
    void showSpeed(QVariant);
    void showOptDev(QVariant);
    void showSpendTime(QVariant);
    void showRemainingTime(QVariant);
public slots:
    void execBashFile(QString filePath);
    QString readBashOutput();
    QString readBashOutput1();
    void stopCurrentTask();
    QString getImageDir();
    void shutDownDevice();
    bool confirmCancel();
    void setStatus(int s);
    QString getDiskSize();

private:
    int st;
    QProcess process;
};

#endif // WORKTOOL_H
